how to evaluate the composition of trig functions